RST2LATEX_OPTIONS = --strict --exit-status=warning --traceback

RST2HTML_OPTIONS = --strict --exit-status=warning --traceback

PDFLATEX_OPTIONS = -halt-on-error -output-format pdf 

all: pdf html

pdf: doc.pdf

html: doc.html

read_sd.png: uml.xmi
	umbrello --export png uml.xmi

doc.pdf: doc.latex read_sd.png
	pdflatex $(PDFLATEX_OPTIONS) doc.latex doc.pdf
	
doc.latex: doc.txt read_sd.png
	rst2latex $(RST2LATEX_OPTIONS) doc.txt doc.latex
	
doc.html: doc.txt read_sd.png
	rst2html $(RST2HTML_OPTIONS) doc.txt doc.html

clean:
	/bin/rm -f doc.aux doc.html doc.latex doc.log \
	doc.out read_sd.png
